package com.ciaojian.core.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 剪发优惠记录表
 *
 * @author Atlakyn
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("d_discount_record")
@Builder
public class DiscountRecord extends Model<DiscountRecord> {
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 订单 id
     */
    private Integer orderId;

    /**
     * 优惠类型
     * 0 优惠券
     * 1 会员首单
     * 2 会员折扣
     */
    private Integer type;

    /**
     * 优惠价格
     */
    private BigDecimal amount;

    /**
     * 描述
     */
    @TableField("`describe`")
    private String describe;
}
